package poradnik.medyczny.UI;

import poradnik.medyczny.R;
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Typeface;
import android.net.Uri;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

public class ActionBarBaseActivty extends Activity {
	SharedPreferences prefs;
	TextView titleBarName;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		prefs = PreferenceManager.getDefaultSharedPreferences(this);

	}

	public void setUpActionBar(String titleBar) {
		try {
			ImageView actionBack = (ImageView) findViewById(R.id.action_bar_back);
			actionBack.setOnClickListener(new OnClickListener() {

				@Override
				public void onClick(View v) {
					finish();
				}
			});
		} catch (Exception e) {
		}
		ImageView actionIcon = (ImageView) findViewById(R.id.action_bar_icon);
		actionIcon.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				finish();
			}
		});
		titleBarName = (TextView) findViewById(R.id.action_bar_title);
		titleBarName.setText(titleBar);
	}

}
